package com.example.demo.mapper;

import com.example.demo.model.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface RecommendMapper {
    List<RecommendedItem> getTop3Recommendations(@Param("uid") String uid);
    List<SimilarItem> getTop3SimilarItems(@Param("itemId") String itemId);

    List<RecommendedUser> getTop3UsersByGid(@Param("gid") String gid);

    // 查询用户ID和商品ID
    String getUidByName(@Param("name") String name);
    String getGidByGname(@Param("gname") String gname);

    // 新增带商品名的查询
    List<RecommendedItemWithGname> getTop3RecommendationsWithGname(@Param("uid") String uid);
    List<SimilarItemWithGname> getTop3SimilarItemsWithGname(@Param("itemId") String itemId);

    List<InOutData> getLatestInout();

    List<CategoryCount> getCategoryCounts();
    List<ProductInOut> getProductInOutCounts();

}
